<!DOCTYPE html>
<html>
<head>
<title></title>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport"/>

<!-- 引入基础的css和js -->
<link rel="import" href="../material/import.html" id="import"/>

</head>
<body>
<div id="app" v-cloak class="content-div">
    <!-- 列表显示区间 start -->
	<div v-show="showList">
	     <!-- 查询块 start -->
	     <div >
		   	 <div class="panel panel-default">
		        <div >
		            <form id="formSearch" class="form-horizontal">
		                <div class="form-group" >
		                    <div class="col-sm-3">
								<div class="input-group">
								    <div class="input-group-btn">
								        <button  class="btn btn-white" type="button">{{sysLogField.username}}</button>
								    </div>
								    <input type="text" class="form-control" v-model="search.username"
								        onkeyup="this.value=this.value.trim()"/>
							     </div>
					        </div>
					         <div class="col-sm-2">
								<div class="input-group">
									<div class="input-group-btn">
										<button  class="btn btn-white" type="button">{{sysLogField.type}}</button>
									</div>
									<select class=" form-control" v-model="search.type" >
										<option value="">{{pageData.select}}</option>
										<option v-for="logdata in baseData.logData" :value="logdata.key" >{{ logdata.value }}</option>
									</select>
								</div>
							</div>
							 <div class="col-sm-2" style="width:248px;padding-right: 1px;">
								<div class="input-group">
								    <div class="input-group-btn">
								        <button  class="btn btn-white" type="button">{{sysLogField.createDate}}</button>
								    </div>
								    <input type="text" class="form-control" v-model="search.searchBeginTime" style="-webkit-box-shadow: 0 0 0px 0px white inset!important;" readonly id="searchBeginTime" />
							     </div>
					        </div>
							 <div class="col-sm-1" style="width:30px;margin-top: 6px;text-align: center;padding-left: 1px;padding-right: 1px;">
								--
					        </div>
				            <div class="col-sm-2" style="width:180px;padding-left: 1px;">
						        <div class="input-group">
									    <input type="text" style="-webkit-box-shadow: 0 0 0px 0px white inset!important;" class="form-control" v-model="search.searchEndTime" readonly id="searchEndTime" />
								   </div>
				        	</div>
				        	
					        <div class="col-sm-1">
								<button type="button" style="margin-left:10px" id="btn_query" class="btn btn-primary" v-on:click="query">{{pageData.query}}</button>
                            </div>
                            <div class="col-sm-2" style="width:350px;padding-right: 1px;">
								<div class="input-group">
									<div class="input-group-btn">
										<button  class="btn btn-white" type="button">{{sysLogField.historyDocument}}</button>
									</div>
									<select id="downloadLog" class=" form-control">
										<option value="">{{pageData.select}}</option>
										<!-- <option v-for="logdata in baseData.logData" :value="logdata.key" >{{ logdata.value }}</option> -->
									</select>
								</div>
							</div>
							<div class="col-sm-1">
								<button v-if="hasPermission('syslog:downloadbackuplog')" type="button" style="margin-left:10px" id="download" class="btn btn-primary" v-on:click="downloadLog">{{pageData.downloadBackupLog}}</button>
                            </div>
		                </div>
		            </form>
		        </div>
		    </div>
	    </div>
	    <!-- 查询块 end -->   
	    <!-- 列表table显示 start -->
		<div class="grid-btn" id="toolbar">
			<a v-if="hasPermission('syslog:save')" class="btn btn-primary" v-on:click="add"><i class="fa fa-plus"></i>&nbsp;{{pageData.add}}</a>
			<a v-if="hasPermission('syslog:update')" class="btn btn-primary" v-on:click="update"><i class="fa fa-pencil-square-o"></i>&nbsp;{{pageData.update}}</a>
			<a v-if="hasPermission('syslog:delete')" class="btn btn-primary" v-on:click="del"><i class="fa fa-trash-o"></i>&nbsp;{{pageData.delete}}</a>
			<a id="submit" v-if="hasPermission('syslog:submit')" class="btn btn-primary" v-on:click="audit(1)"><i class="fa fa-hand-pointer-o"></i>&nbsp;{{pageData.auditSubmit}}</a>
			<a id="checkOk" v-if="hasPermission('syslog:auditpass')" class="btn btn-primary" v-on:click="audit(2)"><i class="fa fa-check-circle"></i>&nbsp;{{pageData.auditPass}}</a>
			<a id="checkFail" v-if="hasPermission('syslog:auditnopass')" class="btn btn-primary" v-on:click="audit(3)"><i class="fa fa-minus-circle"></i>&nbsp;{{pageData.auditNoPass}}</a>	
			<a id="setBackupDetail" v-if="hasPermission('syslog:setbackupdetail')" class="btn btn-primary" v-on:click="setBackupDetail"><i class="fa fa-check-circle"></i>&nbsp;{{pageData.setBackupDetail}}</a>
			<a id="backupLog" v-if="hasPermission('syslog:backuplog')" class="btn btn-primary" v-on:click="backupLog"><i class="fa fa-minus-circle"></i>&nbsp;{{pageData.backupLog}}</a>
		</div>
	    <table id="table"></table>
	    <!-- 列表table显示end -->
	</div>
    <!-- 列表显示区间 end -->
    
    <!-- 编辑内容显示区间 start -->
    <div v-show="false" class="panel panel-default">
		<div class="panel-heading">{{title}} <a class="ml10" href="javascript:void(0)"  data-toggle="tooltip" v-on:click="reload"><i class="fa fa-arrow-left"></i></a></div>
		<form id="defaultForm" class="form-horizontal" enctype="multipart/form-data">
										
			<div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysLogField.username}}</div>
			     	<div class="col-sm-3">
	              		<input type="text" class="input-small form-control" name="username" v-model="sysLog.username" :placeholder="sysLogField.username"/>
	                </div>
	         </div>
	    						
			<div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysLogField.operation}}</div>
			     	<div class="col-sm-3">
	              		<input type="text" class="input-small form-control" name="operation" v-model="sysLog.operation" :placeholder="sysLogField.operation"/>
	                </div>
	         </div>
	    						
			<div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysLogField.method}}</div>
			     	<div class="col-sm-3">
	              		<input type="text" class="input-small form-control" name="method" v-model="sysLog.method" :placeholder="sysLogField.method"/>
	                </div>
	         </div>
	    						
			<div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysLogField.params}}</div>
			     	<div class="col-sm-3">
	              		<input type="text" class="input-small form-control" name="params" v-model="sysLog.params" :placeholder="sysLogField.params"/>
	                </div>
	         </div>
	    						
			<div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysLogField.ip}}</div>
			     	<div class="col-sm-3">
	              		<input type="text" class="input-small form-control" name="ip" v-model="sysLog.ip" :placeholder="sysLogField.ip"/>
	                </div>
	         </div>
	    						
			<div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysLogField.createDate}}</div>
			     	<div class="col-sm-3">
	              		<input type="text" class="input-small form-control" name="createDate" v-model="sysLog.createDate" :placeholder="sysLogField.createDate"/>
	                </div>
	         </div>
	    				
		     <div class="form-group">
				<div class="col-sm-4 control-label"></div> 
					<input id="validateBtn" type="button" class="btn btn-primary" v-on:click="saveOrUpdate"  :value="pageData.sure"/>&nbsp;&nbsp;
					<input type="button" class="btn btn-warning" v-on:click="reload" :value="pageData.return"/>
			 </div>		
		</form>
    </div>
	<!-- 编辑内容显示区间 end -->
	
	<!-- 编辑备份配置区间 start -->
	<div v-show="showSetBackupDetail" class="panel panel-default">
		<div class="panel-heading">{{title}} <a class="ml10" href="javascript:void(0)"  data-toggle="tooltip"  @click="reload"><i class="fa fa-arrow-left"></i></a></div>
		<form id="defaultForm" class="form-horizontal" enctype="multipart/form-data">
										
			<div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysLogField.backupTime}}</div>
			     	<div class="col-sm-3">
	              		<select class="input-small form-control" name="logBackupType" v-model="sysLogConfig.logBackupType" :placeholder="sysLogField.backupTime">
	                        <option value="">{{pageData.select}}</option>
	                        <option value="1">{{pageData.A_MONTH_AGO}}</option>
	                        <option value="2">{{pageData.THREE_MONTH_AGO}}</option>
	                        <option value="3">{{pageData.HALF_YEAR_AGO}}</option>
	                        <option value="4">{{pageData.A_YEAR_AGO}}</option>
	                        <option value="5">{{pageData.TWO_YEAR_AGO}}</option>
                    	</select>
	                </div>
	         </div>
	    						
			<div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysLogField.executeType}}</div>
			     	<div class="col-sm-3">
	              		<select class="input-small form-control" name="logRunType" v-model="sysLogConfig.logRunType"  :placeholder="sysLogField.executeType">
	                        <option value="">{{pageData.select}}</option>
	                        <option value="1">{{pageData.EVERY_DAY}}</option>
	                        <option value="2">{{pageData.EVERY_WEEK}}</option>
	                        <option value="3">{{pageData.EVERY_MONTH}}</option>
                    	</select>
	                </div>
	         </div>
	    						
			<div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysLogField.executeTime}}</div>
			     	<div class="col-sm-3">
	              		<input id="executeTime" type="text" class="input-small form-control" name="logRunTimestr" 
	              		 :placeholder="sysLogField.executeTime" readonly="readonly"/>
	                </div>
	         </div>
	         
	         <div class="form-group">
			     	<div class="col-sm-2 control-label">{{sysLogField.logBackupPath}}</div>
			     	<div class="col-sm-3">
	              		<input id="logBackupPath" type="text" class="input-small form-control" name="logBackupPath" 
	              		 :placeholder="sysLogField.logBackupPath"/>
	                </div>
	         </div>
	    						
		     <div class="form-group">
				<div class="col-sm-4 control-label"></div> 
					<input id="validateBtn" type="button" class="btn btn-primary" @click="saveOrUpdateSysLogConfig"  :value="pageData.sure"/>&nbsp;&nbsp;
					<input type="button" class="btn btn-warning" @click="reload" :value="pageData.return"/>
			 </div>		
		</form>
    </div>
	<!-- 编辑备份配置区间 end -->
	    
</div>

<script src="../sys/js/syslog.js"></script>
<script src="../public/js/mobileXg.js"></script>
</body>
</html>